package com.atguigu.yygh.hosp.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.atguigu.yygh.hosp.mapper.HospitalSetMapper;
import com.atguigu.yygh.hosp.service.HospitalSetService;
import com.atguigu.yygh.model.hosp.HospitalSet;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/** 
* @author 作者 Your-Name: 
* @version 创建时间：2021年3月25日 上午9:44:12 
* 类说明 
*/
@Service
public class HospitalSetServiceImpl extends ServiceImpl<HospitalSetMapper, HospitalSet> implements HospitalSetService {

 
	//  ServiceImpl 类中 已实现 spring注入
	//@Autowired    protected M baseMapper;
	
//	@Autowired 
//	private HospitalSetMapper hospitalSetMapper;
	
	@Override
	public String getSignKey(String hostcode) {
		// TODO Auto-generated method stub
		// 根据医院编号  得到signKey
		QueryWrapper<HospitalSet> wapper = new QueryWrapper<>();
		wapper.eq("hostcode", hostcode);
		HospitalSet hospitalSet = baseMapper.selectOne(wapper);
		return hospitalSet.getSignKey();
	}
	
}
